package it.apiconsulting.wot.jsonView;

import java.util.ArrayList;
import java.util.List;

import it.apiconsulting.wot.bean.SchedaFoodBean;
import it.apiconsulting.wot.service.SchedaUtenteService;
import it.apiconsulting.wot.view.BaseAction;

public class SchedaUtenteJsonAction extends BaseAction {

	private static final long serialVersionUID = 1L;
	
	private SchedaUtenteService schedaUtenteService;
	
	private List<SchedaFoodBean> schedaFoodBean;
	
	private String idUtente;
	private String numSchede;

	public SchedaUtenteJsonAction() {
		schedaUtenteService = new SchedaUtenteService();
	}

	public String execute() {
		
		schedaFoodBean = new ArrayList<SchedaFoodBean>();
		if ( idUtente!=null ) {
			schedaFoodBean = schedaUtenteService.getSchedeFoodBean(idUtente, numSchede);
		} else {
		}
		return "success";
	}

	public String getIdUtente() {
		return idUtente;
	}

	public void setIdUtente(String idUtente) {
		this.idUtente = idUtente;
	}

	public String getNumSchede() {
		return numSchede;
	}

	public void setNumSchede(String numSchede) {
		this.numSchede = numSchede;
	}

	public List<SchedaFoodBean> getSchedaFoodBean() {
		return schedaFoodBean;
	}

	public void setSchedaFoodBean(List<SchedaFoodBean> schedaFoodBean) {
		this.schedaFoodBean = schedaFoodBean;
	}

}